package com.xing.feign.FallbackFactory;

import com.xing.Utils.Result;
import com.xing.feign.UserFeign;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

/**
 * @Author <a href="https://gitee.com/a-tom-is-cry">Xing</a>
 * @Date 2025/3/18 22:44
 * @Description
 */
@Component
public class UserFeignFallbackFactory implements FallbackFactory<UserFeign> {
    @Override
    public UserFeign create(Throwable cause) {
        return new UserFeign() {
            @Override
            public Result getUserById(String id) {
                return new Result();
            }
        };
    }
}
